package com.fulu.game.bi.controller.room;

import com.fulu.game.bi.entity.vo.Result;
import com.fulu.game.bi.service.impl.room.RoomConditionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 语言互动-查询条件接口
 */
@RestController
@RequestMapping("/api/voice/condition")
@Slf4j
public class VoiceConditionController {

    @Autowired
    private RoomConditionService roomConditionService;

    /**
     * 语言互动查询条件-房间类型
     */
    @RequestMapping("/room-category")
    public Result roomCategory() {
        return Result.success().data(roomConditionService.roomCategory());
    }

    /**
     * 语言互动查询条件-房间编号
     */
    @RequestMapping("/room-no")
    public Result roomNo(@RequestParam(defaultValue = "1") Integer pageNum,
                         @RequestParam(defaultValue = "10") Integer pageSize,
                         String roomNo) {
        return Result.success().data(roomConditionService.roomNo(pageNum, pageSize, roomNo));
    }

    /**
     * 语言互动查询条件-公会编号
     */
    @RequestMapping("/guild-code")
    public Result guildCode(@RequestParam(defaultValue = "1") Integer pageNum,
                            @RequestParam(defaultValue = "10") Integer pageSize,
                            String guildCode) {
        return Result.success().data(roomConditionService.guildCode(pageNum, pageSize, guildCode));
    }
}
